package demo3;

import java.util.Arrays;
import java.util.Locale;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 86138
 * Date: 2024-10-16
 * Time: 17:06
 */
public class C extends S implements InterS {
    public String gender;
    public String tel;

    public C(String num,int[] score){
        super(num,score);
    }


    class InnerC{

    }

    String sex;
    String telNumber;

    public C(String name, int[] score, String gender, String tel) {
        super(name, score);
        this.gender = gender;
        this.tel = tel;
    }

    public double min() {
        int ret = Math.min(score[0], score[1]);//ret中间变量
        int min = Math.min(ret, score[2]);
        return min;
    }

    //年龄是否规范
    public boolean is_Ok(int age) {
        if (age >= 18 || age <= 22) {
            System.out.println("年龄规范");
            return true;
        }
        System.out.println("年龄不规范");
        return false;
    }

    //成绩排序
    public void  sort(C[] arr){
        Arrays.sort(arr);
        System.out.println(Arrays.toString(arr));
    }

    //是否包含另一个字符串
    public boolean find(String str,String st){
        if(str.contains(st)){
            return true;
        }
        return false;
    }

    //长度
    public int count(String str){
        return str.length();
    }

    //将第一个字符变为大写
    public void set_Upper(StringBuffer buf){
        String a = buf.substring(0,1).toUpperCase()+buf.substring(1);
    }


}
